
if(typeof(Meteor)=='undefined'){window.Meteor={};}
Meteor.Core=Meteor.Core||{};Meteor.Core.Lang=Meteor.Core.Lang||{};Meteor.Core.Env=Meteor.Core.Env||{};Meteor.Core.Env.Privileged=typeof(Meteor.Core.Env.Privileged)!=='undefined'?Meteor.Core.Env.Privileged:false;Meteor.Data=Meteor.Data||{};Meteor.Util=Meteor.Util||{};Meteor.Widget=Meteor.Widget||{};Meteor.App=Meteor.App||{};Meteor.UI=Meteor.UI||{};Meteor.Core.Object={};Meteor.Core.Object.merge=function(o1,o2){if(typeof(o1)!=='object'){o1={};}
if(typeof(o2)!=='object'){o2={};}
var result={};for(var i in o1){result[i]=o1[i];}
for(var i in o2){result[i]=o2[i];}
return result;};Meteor.Core.Object.define=function(variable,defaultValue){if(typeof(variable)=='undefined'){return defaultValue;}else{return variable;}}
Meteor.Core.Object.flatten=function(data,name){if(typeof(name)=='undefined'){name='formData';}
var output={};for(var i in data){var key=name+'['+i+']';if(typeof(data[i])=='object'){var tmp=Meteor.Core.Object.flatten(data[i],key);for(var x in tmp){output[x]=tmp[x];}}else{output[key]=data[i];}}
return output;};Meteor.Core.Lang.augmentObject=function(r,s){if(!s||!r){throw new Meteor.Core.Exception("Absorb failed, verify dependencies.");}
var a=arguments,i,p,overrideList=a[2];if(overrideList&&overrideList!==true){for(i=2;i<a.length;i=i+1){r[a[i]]=s[a[i]];}}else{for(p in s){if(overrideList||!(p in r)){r[p]=s[p];}}}};Meteor.Core.Lang.augmentProto=function(r,s){if(!s||!r){throw new Meteor.Core.Exception("Augment failed, verify dependencies.");}
var a=[r.prototype,s.prototype],i;for(i=2;i<arguments.length;i=i+1){a.push(arguments[i]);}
L.augmentObject.apply(this,a);};Meteor.Core.Event=function(type,cancelable,data){this.timeStamp=(new Date()).getTime();this.type=type;this.cancelable=typeof(cancelable)!='undefined'?cancelable:true;this.target=null;this.returnValue=true;this.data=typeof(data)!='undefined'?data:{};};Meteor.Core.Event.prototype.preventDefault=function(){if(this.cancelable){this.returnValue=false;}};Meteor.Core.Event.prototype.toString=function(){return this.type;};Meteor.Core.EventTarget=function(){this._eventhandlers=[];}
Meteor.Core.EventTarget.prototype.addEventListener=function(type,callback){if(typeof this._eventhandlers[type]=="undefined"){this._eventhandlers[type]=[];}
this._eventhandlers[type].push(callback);};Meteor.Core.EventTarget.prototype.dispatchEvent=function(oEvent){oEvent.target=this;if(typeof(this._eventhandlers[oEvent.type])!="undefined"){for(var i=0;i<this._eventhandlers[oEvent.type].length;i++){this._eventhandlers[oEvent.type][i](oEvent);}}
return oEvent.returnValue;};Meteor.Core.Exception=function(message,data){this.__exceptionMessage=message||{};this.__exceptionData=data||{};};Meteor.Core.Exception.prototype.getMessage=function(){return this.__exceptionMessage;};Meteor.Core.Exception.prototype.getData=function(){return this.__exceptionData;};Meteor.Core.Exception.prototype.toString=function(){return this.getMessage();};Meteor.Core.ThrowsException=function(prefix){this.__ThrowsExceptionPrefix=prefix||'';};Meteor.Core.ThrowsException.prototype.throwException=function(message,data){throw new Meteor.Core.Exception(this.__ThrowsExceptionPrefix+'Exception: '+message,data);};Meteor.Core.Widget=function(widgetName){this.__widgetName=widgetName;this.__instanceID=widgetName+"_"+parseInt(Math.random()*100000000);this._options={};};Meteor.Core.Widget.prototype.setOption=function(key,value){if(typeof(key)==='undefined'){return this;}else if(typeof(key)=='object'){Meteor.Core.Lang.augmentObject(this._options,key,true);}else{this._options[key]=value;}
return this;};Meteor.Core.Widget.prototype.getName=function(){return this.__widgetName;};Meteor.Core.Widget.prototype.getID=function(){return this.__instanceID;};Meteor.Core.Widget.prototype.render=function(){if(typeof(this._render)=='undefined'){this.throwException('brak implementacji metody _render');}
this._render();return this;};Meteor.Core.Widget.prototype.throwException=function(msg,data){throw new Meteor.Core.Exception("Widget."+this.getName()+": "+msg,data);};if(typeof(Meteor)==='undefined'){Meteor={};}
if(typeof(Meteor.Util)==='undefined'){Meteor.Util={};}
Meteor.Util.FileUploader={frame:function(c){var n='f'+Math.floor(Math.random()*99999);var d=document.createElement('DIV');d.innerHTML='<iframe style="display:none" src="about:blank" id="'+n+'" name="'+n+'" onload="Meteor.Util.FileUploader.loaded(\''+n+'\')"></iframe>';document.body.appendChild(d);var i=document.getElementById(n);if(c&&typeof(c.onComplete)=='function'){i.onComplete=c.onComplete;}
return n;},form:function(f,name){f.setAttribute('target',name);},submit:function(f,c){Meteor.Util.FileUploader.form(f,Meteor.Util.FileUploader.frame(c));if(c&&typeof(c.onStart)=='function'){return c.onStart();}else{return true;}},loaded:function(id){var i=document.getElementById(id);if(i.contentDocument){var d=i.contentDocument;}else if(i.contentWindow){var d=i.contentWindow.document;}else{var d=window.frames[id].document;}
if(d.location.href=="about:blank"){return;}
if(typeof(i.onComplete)=='function'){i.onComplete(d.body.innerHTML);}}};Meteor.Util.Logger=function(){this._enabled=true;};Meteor.Util.Logger._instance=null;Meteor.Util.Logger.getInstance=function(){if(Meteor.Util.Logger._instance==null){Meteor.Util.Logger._instance=new Meteor.Util.Logger();}
return Meteor.Util.Logger._instance;};Meteor.Util.Logger.prototype.write=function(msg,type){if(this._enabled==false){return this;}
if(typeof(type)==='undefined'){type='log';}
try{console[type](msg);}catch(e){}
return this;};Meteor.Util.Logger.prototype.enable=function(){this._enabled=true;return this;}
Meteor.Util.Logger.prototype.disable=function(){this._enabled=false;return this;}
Meteor.Util.Logger.LoggerEnabled=function(prefix){Meteor.Core.Lang.augmentObject(this,new Meteor.Core.ThrowsException("Meteor.Util.Logger.LoggerEnabled"));if(typeof(prefix)=='undefined'){this.throwException('brak prefixu');}
this.__LoggerLoggerEnabledPrefix=prefix||'anonim';};Meteor.Util.Logger.LoggerEnabled.prototype.log=function(msg,type){Meteor.Util.Logger.getInstance().write(this.__LoggerLoggerEnabledPrefix+": "+msg,type);};Meteor.Util.URI={};Meteor.Util.URI.parseQueryString=function(s){var r,a,p;r={};a=s.split('&');for(var i=0;i<a.length;i++){p=a[i].split('=');if(p.length===2&&p[0].length>0){r[p[0]]=decodeURIComponent(p[1]);}}
return r;};Meteor.Util.URI.buildQueryString=function(parameters){var qsElements=[];for(var key in parameters){qsElements.push(encodeURIComponent(key)+"="+encodeURIComponent(parameters[key]));}
return qsElements.join('&');};Meteor.Util.Template=function(){this._varCounter=0;this._data={};this._template="brak szablonu";this._strict=true;this.reset();};Meteor.Util.Template._instance=null;Meteor.Util.Template.getInstance=function(){if(Meteor.Util.Template._instance==null){Meteor.Util.Template._instance=new Meteor.Util.Template();}
return Meteor.Util.Template._instance;};Meteor.Util.Template.prototype.parse=function(template,data){template=Meteor.Core.Object.define(template,this._template);data=Meteor.Core.Object.define(data,this._data);for(var k in data){template=template.replace(new RegExp("\\{\\$"+k+"\\}","g"),data[k]);}
if(this._strict){template=template.replace(new RegExp("\\{\\$[a-zA-Z0-9]*\\}","g"),'');}
return template;};Meteor.Util.Template.prototype.setData=function(data,key){if(typeof(key)=='undefined'){if(typeof(data)=='object'){this._data=data;}else{this._data[this._varCounter++]=data;}}else{this._data[key]=data;}
return this;};Meteor.Util.Template.prototype.setTemplate=function(template){this._template=template;return this;};Meteor.Util.Template.prototype.reset=function(){this._template="brak szablonu";this._data={};this._varCounter=0;return this;};Meteor.Util.Template.prototype.setStrict=function(b){this._strict=b?true:false;return this;};Meteor.Util.Validate={};Meteor.Util.Validate.nrb=function(nrb){if(nrb.length!=26){return 0;}
var W=[1,10,3,30,9,90,27,76,81,34,49,5,50,15,53,45,62,38,89,17,73,51,25,56,75,71,31,19,93,57];nrb+="2521";nrb=nrb.substr(2)+nrb.substr(0,2);var Z=0;for(var i=0;i<30;i++){Z+=nrb[29-i]*W[i];}
return Z%97==1;};Meteor.Util.Validate.floatNumber=function(val){return val.match(/^\d+(\.\d+)?$/);};Meteor.Util.Validate.intNumber=function(val){return val.match(/^\d+$/);};Meteor.Util.Validate.email=function(val){var pattern=/^[A-Za-z0-9._%+-]+@[^.][A-Za-z0-9.-]+\.[a-zA-Z]{2,4}$/;return pattern.test(val);};Meteor.Util.Validate.www=function(val){var pattern=/^http(s)?:\/\/[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(\/.*)?$/i;return pattern.test(val);};Meteor.Util.Form={};Meteor.Util.Form.getData=function(form){var f=$(form);var data={};f.find("input[type=text], input[type=checkbox]:checked, textarea, input[type=radio]:checked, select").each(function(){var el=$(this);var elName=el.attr('name');if(elName){data[elName]=el.val();}});return data;};Meteor.Util.Form.cleanUpFloat=function(l,positive){positive=typeof(positive)!=='undefined';var result=parseFloat(String(l).replace(',','.').replace(/[^1234567890\.\-)]/g,''));result=isNaN(result)?'':result;return!positive||(positive&&result>0)?result:'';};Meteor.Util.Form.cleanUpInt=function(l,positive){positive=typeof(positive)!=='undefined';var pattern=positive?/[^1234567890]/g:/[^1234567890\-)]/g;var result=String(l).replace(pattern,'');result=isNaN(result)?'':result;return!positive||(positive&&result>0)?result:'';};Meteor.Util.String={};Meteor.Core.Lang.augmentObject(Meteor.Util.String,new Meteor.Core.ThrowsException("Meteor.Util.String"));Meteor.Util.String.UPPERCASE=1;Meteor.Util.String.NORMAL=0;Meteor.Util.String.LOWERCASE=-1;Meteor.Util.String.trim=function(str,chars){return Meteor.Util.String.ltrim(Meteor.Util.String.rtrim(str,chars),chars);};Meteor.Util.String.ltrim=function(str,chars){chars=chars||"\\s";return str.replace(new RegExp("^["+chars+"]+","g"),"");};Meteor.Util.String.rtrim=function(str,chars){chars=chars||"\\s";return str.replace(new RegExp("["+chars+"]+$","g"),"");};Meteor.Util.String.escapeHTML=function(string){return string.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');};Meteor.Util.String.truncate=function(string,length,truncation){length=length||30;truncation=typeof(truncation)==='undefined'?'...':truncation;return string.length>length?string.slice(0,length-truncation.length)+truncation:String(string);};Meteor.Util.String.stripTags=function(string){return string.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi,'');};Meteor.Util.String.stripAccents=function(s,c){var acc,str,o,r,i
if('undefined'===typeof(c)){c=Meteor.Util.String.LOWERCASE;}
acc='É Ê Ë š Ì Í ƒ œ µ Î Ï ž Ð Ÿ Ñ Ò Ó Ô Š £ Õ Ö Œ ¥ Ø Ž § À Ù Á Ú Â Û Ã Ü Ä Ý ';str='E E E s I I f o m I I z D Y N O O O S L O O O Y O Z S A U A U A U A U A Y ';acc+='Å Æ ß Ç à È á â û Ĕ ĭ ņ ş Ÿ ã ü ĕ Į Ň Š Ź ä ý Ė į ň š ź å þ ė İ ŉ Ţ Ż æ ÿ ';str+='A A S C a E a a u E i n s Y a u e I N S Z a y E i n s z a p e I n T Z a y ';acc+='Ę ı Ŋ ţ ż ç Ā ę Ĳ ŋ Ť Ž è ā Ě ĳ Ō ť ž é Ă ě Ĵ ō Ŧ ſ ê ă Ĝ ĵ Ŏ ŧ ë Ą ĝ Ķ ŏ ';str+='E l n t z c A e I n T Z e a E i O t z e A e J o T i e a G j O t e A g K o ';acc+='Ũ ì ą Ğ ķ Ő ũ í Ć ğ ĸ ő Ū î ć Ġ Ĺ Œ ū ï Ĉ ġ ĺ œ Ŭ ð ĉ Ģ Ļ Ŕ ŭ ñ Ċ ģ ļ ŕ Ů ';str+='U i a G k O u i C g k o U i c G L O u i C g l o U o c G L R u n C g l r U ';acc+='ò ċ Ĥ Ľ Ŗ ů ó Č ĥ ľ ŗ Ű ô č Ħ Ŀ Ř ű õ Ď ħ ŀ ř Ų ö ď Ĩ Ł Ś ų Đ ĩ ł ś Ŵ ø đ ';str+='o c H L R u o C h l r U o c H L R u o D h l r U o d I L S c D i l s W o d ';acc+='Ī Ń Ŝ ŵ ù Ē ī ń ŝ Ŷ Ə ú ē Ĭ Ņ Ş ŷ   : ; . ,';str+='I N S w u E i n s Y e u e I N S y _ _ _ _ _';o='';var ta=acc.split("\t");var ts=str.split("\t");for(i=0;i<ta.length;i++){r=new RegExp('['+ta[i]+']','g');s=s.replace(r,ts[i]);}
s=s.replace(/[^a-zA-Z0-9_-]/gi,o);s=s.replace(/[_]+/,'_');s=s.replace(/^_*(.*?)_*$/gi,'$1')
if(c===Meteor.Util.String.LOWERCASE){return s.toLowerCase();}else if(c===Meteor.Util.String.UPPERCASE){return s.toUpperCase();}else{return s;}}
Meteor.Util.AjaxEnabled=function(options){this.__AjaxEnabledOptions=Meteor.Core.Object.merge({'urlPatternEnabled':false,'urlPattern':''},options);};Meteor.Util.AjaxEnabled.prototype.ajax=function(ajaxOptions,options){var _options=Meteor.Core.Object.merge(this.__AjaxEnabledOptions,options);var _ajaxOptions=Meteor.Core.Object.merge({type:'GET',url:''},ajaxOptions);if(_options.urlPatternEnabled&&typeof(ajaxOptions.url)!=='undefined'){Meteor.Util.Template.getInstance().reset();_ajaxOptions.url=Meteor.Util.Template.getInstance().setData(ajaxOptions.url).parse(_options.urlPattern);}
return $.ajax(_ajaxOptions);};Meteor.Util.AjaxEnabled.prototype.ajaxPost=function(url,p1,p2){var _ajaxOptions={url:url,data:typeof(p1)=='function'?{}:p1,success:typeof(p1)=='function'?p1:(typeof(p2)=='function'?p2:function(){}),type:'POST'};return this.ajax(_ajaxOptions);};Meteor.Util.AjaxEnabled.prototype.ajaxGet=function(url,p1,p2){var _ajaxOptions={url:url,data:typeof(p1)=='function'?{}:p1,success:typeof(p1)=='function'?p1:(typeof(p2)=='function'?p2:function(){}),type:'GET'};return this.ajax(_ajaxOptions);};Meteor.Util.AjaxEnabled.prototype.ajaxSetOption=function(key,value){this.__AjaxEnabledOptions[key]=value;return this;};if(typeof(Meteor.Util.JSONP)==='undefined'){Meteor.Util.JSONP=function(){var requestsCount=0;var options={interval:100,storeResults:false,startCallback:function(){},endCallback:function(){}};var requestsInProgress=0;var encodeParam=function(param){if(typeof(param)==="string"){return param;}else if(typeof(param)==="object"){var wynik='';for(att in param){wynik+="&"+encodeURIComponent(att)+'='+encodeURIComponent(param[att]);}
return wynik;}else{return'';}};return{requests:[],setup:function(param){if(typeof(param)==='object'){for(p in param){options[p]=param[p];}}},get:function(url,param,callback){if(requestsInProgress===0){options.startCallback();}
requestsInProgress++;if(typeof(param)==="function"&&typeof(callback)==="undefined"){callback=param;}
var name=+(requestsCount++);var script=document.createElement('script');script.type="text/javascript";param=typeof(param)==="undefined"?'':param;script.src=url+(url.indexOf('?')!=-1?"&":"?")+"reqName="+name+encodeParam(param);document.getElementsByTagName('head')[0].appendChild(script);Meteor.Util.JSONP.requests[name]={script:script,callback:callback,loaded:function(data){Meteor.Util.JSONP.requests[name].data=data;if(typeof(callback)==='function'){callback(Meteor.Util.JSONP.requests[name].data,name);}
Meteor.Util.JSONP._cleanUpRequest(name);}};return Meteor.Util.JSONP.requests[name];},_cleanUpRequest:function(name){Meteor.Util.JSONP.requests[name].script.parentNode.removeChild(Meteor.Util.JSONP.requests[name].script);if(!options.storeResults){delete Meteor.Util.JSONP.requests[name];}else{delete Meteor.Util.JSONP.requests[name].script;delete Meteor.Util.JSONP.requests[name].callback;delete Meteor.Util.JSONP.requests[name].listener;}
requestsInProgress--;if(requestsInProgress===0){options.endCallback();}}}}();}
if('undefined'===typeof(Meteor.Util.Cookie)){Meteor.Util.Cookie={};Meteor.Util.Cookie.create=function(name,value,lifetimeSeconds){name=name;if(lifetimeSeconds){var date=new Date();date.setTime(date.getTime()+(lifetimeSeconds*1000));var expires="; expires="+date.toGMTString();}
else var expires="";document.cookie=name+"="+value+expires+"; path=/";};Meteor.Util.Cookie.get=function(name){name=name;var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;};Meteor.Util.Cookie.erase=function(name){Meteor.Util.Cookie.create(name,"",-1);};}
if(typeof(Meteor)==='undefined'){Meteor={};}
if(typeof(Meteor.Addons)==='undefined'){Meteor.Addons={};}
if(typeof(Meteor.Addons.MeteorExt)==='undefined'){Meteor.Addons.MeteorExt={};}
if(typeof(Meteor.Addons.MeteorExt.Noclegi)==='undefined'){Meteor.Addons.MeteorExt.Noclegi={};}
if(typeof(Meteor.Addons.MeteorExt.Specjalisci)==='undefined'){Meteor.Addons.MeteorExt.Specjalisci={};}
if(typeof(Meteor.Addons.Utils)=="undefined"){Meteor.Addons.Utils={JqueryScriptOutputed:false,JqueryLoadedFromThis:false,PathHeler:{MainJsPath:'http://add.meteor24.pl/add/JS/AddsManager',AddonsPath:'http://add.meteor24.pl/add/JS/AddsManager',ModulesPath:'http://add.meteor24.pl/add/JS/AddsManager/Modules',ResourcesPath:'http://add.meteor24.pl/add/JS/AddsManager/Resources'},Load:function(moduleName,moduleType){if(typeof(moduleType)==='undefined'){moduleType='Noclegi';}
this.debug("Meteor: Loading "+moduleType+"."+moduleName);var scriptElem=document.createElement('script');scriptElem.setAttribute('src',this.PathHeler.ModulesPath+'/'+moduleType+'/MeteorExt'+moduleName+'.js');scriptElem.setAttribute('type','text/javascript');document.getElementsByTagName('head')[0].appendChild(scriptElem)},LoadJquery:function initJQuery(fCallback){if(typeof(jQuery)=='undefined'){if(!Meteor.Addons.Utils.JqueryScriptOutputed){Meteor.Addons.Utils.JqueryScriptOutputed=true;Meteor.Addons.Utils.JqueryLoadedFromThis=true;Meteor.Addons.Utils.LoadJs("http://meteor24.pl/add/JS/JQuery/jquery-1.4.1.min.js");}
setTimeout(function(){Meteor.Addons.Utils.LoadJquery(fCallback);},50);}else{if(Meteor.Addons.Utils.JqueryLoadedFromThis){jQuery.noConflict();}
fCallback.apply(this);}},LoadJs:function(scriptPath){var scriptElem=document.createElement('script');scriptElem.setAttribute('src',scriptPath);scriptElem.setAttribute('type','text/javascript');document.getElementsByTagName('head')[0].appendChild(scriptElem)},LoadCss:function(fileName){var linkElem=document.createElement('link');linkElem.setAttribute('href',this.PathHeler.ResourcesPath+'/'+fileName+'.css');linkElem.setAttribute('type','text/css');linkElem.setAttribute('rel','stylesheet');linkElem.setAttribute('id','link-element-'+fileName);document.getElementsByTagName('head')[0].appendChild(linkElem)},showOverlay:function(oOptions){this.LoadCss('overlay');var overlayElement=document.createElement('div');overlayElement.setAttribute('id','overlay-container');var overlayContentElement=document.createElement('div');overlayContentElement.setAttribute('id','overlay-content');overlayElement.appendChild(overlayContentElement);var overlayContentElementDIV=document.createElement('div');overlayContentElementDIV.setAttribute('id','overlay-content-div');overlayContentElementDIV.innerHTML=oOptions.Html;overlayContentElement.appendChild(overlayContentElementDIV);document.getElementsByTagName('body')[0].appendChild(overlayContentElement);document.getElementsByTagName('body')[0].appendChild(overlayElement);this.addEvent(overlayElement,'click',this.removeOverlay);this.addEvent(overlayContentElement,'click',this.removeOverlay);},removeOverlay:function(){if(document.getElementById('link-element-overlay')){document.getElementsByTagName('head')[0].removeChild(document.getElementById('link-element-overlay'));}
if(document.getElementById('overlay-container')){document.getElementsByTagName('body')[0].removeChild(document.getElementById('overlay-container'));}
if(document.getElementById('overlay-content')){document.getElementsByTagName('body')[0].removeChild(document.getElementById('overlay-content'));}},addEvent:function(obj,type,fn)
{if(obj.addEventListener)
obj.addEventListener(type,fn,false);else if(obj.attachEvent){obj["e"+type+fn]=fn;obj[type+fn]=function(){obj["e"+type+fn](window.event);}
obj.attachEvent("on"+type,obj[type+fn]);}},debug:function(x){try{console.log(x);}catch(e){}},assert:function(condition,message,data){if(condition===false){throw new Meteor.Addons.Exception(message,data);}},universalHash:function(s,tableSize){var b=27183,h=0,a=31415;return((a*s)*(b%tableSize));},hostPageInfo:{getLocation:function(){var loc="no-data";try{loc=window.location+"";}catch(e){}
return loc;}}}}
if(typeof(Meteor.Addons.Core)=='undefined'){Meteor.Addons.Core={_moduleList:new Array(),_modulesInitialized:false,_init:function(){this._initializeModules();},LoadModules:function(){var args=arguments;for(var i=0;i<args.length;i++){Meteor.Addons.Utils.Load(args[i]);}},LoadModule:function(moduleName,moduleType){Meteor.Addons.Utils.Load(moduleName,moduleType);},RegisterModule:function(oObject){this._moduleList.push(oObject);if(this._modulesInitialized){oObject._init();}},_initializeModules:function(){for(var i=0;i<this._moduleList.length;i++){this._moduleList[i]._init();}
this._modulesInitialized=true;}};}
if(typeof(Meteor.Addons.Core.MeteorExt)=='undefined'){Meteor.Addons.Core.MeteorExt={options:{MeteorService:false,MeteorLinksClass:'MeteorAddLinki',ObiektNr:null,MeteorLinksPattern:{'Noclegi':/(href="http:\/\/meteor24.pl")|(href="http:\/\/meteor.turystyka.pl")|(href="http:\/\/ibed.pl")|(href="http:\/\/emeteor.pl")|(href="http:\/\/e-meteor.pl")/,'NoclegiStrict':/href="http:\/\/meteor.turystyka.pl"/,'Specjalisci':/(href="http:\/\/swiaturody\.com)|(href="http:\/\/znowzdrow.pl)|(href="http:\/\/dentysta\-stomatolog\.com)/}},checkLinks:function(htmlContent,pattern){if(typeof(pattern)=='undefined'){pattern="Noclegi";}
if(typeof(MeteorSerwis)!="undefined"&&MeteorSerwis==1){this.options.MeteorService=true;return true;}
if(typeof(htmlContent)=='undefined'){return false;}
var status=false;if(htmlContent.match(this.options.MeteorLinksPattern[pattern])){status=true;}
if(!status)
return false;else
return true;},hideLinks:function(AddContainer){var allPageTags=document.getElementsByTagName("DIV");for(i=0;i<allPageTags.length;i++){if(allPageTags[i].className==this.options.MeteorLinksClass){if(typeof(allPageTags[i].parentNode.getAttribute("id"))!='undefined'&&allPageTags[i].parentNode.getAttribute("id")==AddContainer){allPageTags[i].style.display='none';}}}},appendHtmlObject:function(oOptions){requiredElement=document.getElementById(oOptions.addContainerId);if(requiredElement!=null){this.options.ObiektNr=requiredElement.getAttribute(oOptions.obiektIDAttribute);if(this.options.ObiektNr!=null){if(!this.options.MeteorService){this.hideLinks(oOptions.addContainerId);}
var width=(requiredElement.style.width!='')?requiredElement.style.width:oOptions.css.width;var height=(requiredElement.style.height!='')?requiredElement.style.height:oOptions.css.height;requiredElement.innerHTML='<iframe border="0" frameborder="0" style="border: none; width: '+width+'px; height:'+height+'px;" src="'+oOptions.source+'" width="'+width+'" height="'+height+'"></iframe>';}else{throw{name:"",message:"Cannot find required attribute '"+oOptions.obiektIDAttribute+"'."}}}else{throw{name:"",message:"Cannot find required HTML Tag in DOM."}}},createIframeElement:function(width,height,src){var iframeElement=document.createElement('iframe');iframeElement.setAttribute('src',src);iframeElement.setAttribute('width',width);iframeElement.setAttribute('height',height);iframeElement.setAttribute('border',0);iframeElement.style.border='none';iframeElement.setAttribute('frameborder',0);return iframeElement;}};}
if(typeof(Meteor.Addons.Exception)=='undefined'){Meteor.Addons.Exception=function(message,data){this.__exceptionMessage=message||{};this.__exceptionData=data||{};};Meteor.Addons.Exception.prototype.getMessage=function(){return this.__exceptionMessage;};Meteor.Addons.Exception.prototype.getData=function(){return this.__exceptionData;};Meteor.Addons.Exception.prototype.toString=function(){return this.getMessage();};}
window.onload=function(){Meteor.Addons.Utils.LoadJquery(function(){jQuery(document).ready(function($){Meteor.Addons.Core._init();});});}
